wx.config({
	debug: false,
	appId: jsdk.appId,
	timestamp: jsdk.timestamp,
	nonceStr: jsdk.nonceStr,
	signature: jsdk.signature,
	jsApiList: [
  		'previewImage'
	]
});

$(function(){
	$('#thelist').on('click', '.wxpicShow', function(e){
		e.preventDefault();
		e.stopPropagation();
		var pic = $(this).attr('data-pic');
		var allPic = $(this).parent().attr('data-pic');
		allPic = allPic.split(',');
		wx.previewImage({
		    current: pic, 
		    urls: allPic
		});
	});
	
	$('.user-center').on('click', '.show-pic', function(e){
		e.preventDefault();
		e.stopPropagation();
		var pic = $(this).attr('data-pic');
		var allPic = $(this).parent().attr('data-pic');
		allPic = allPic.split(',');
		wx.previewImage({
		    current: pic, 
		    urls: allPic
		});
	});
});